Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(anta.tests): allow for positive or negative offset time zones #842

Merged
merged 6 commits into from
Oct 4, 2024

Conversation

Xel-Naha
Copy link
Contributor

Description

When testing ANTA logging format on switches with timezone Europe/London we got fail on the test VerifyLoggingTimestamp. Looking at the regex it seems to match on negative offsets:

r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}-d{2}:\d{2}"

-d{2}:\d{2}"

to allow for positive offsets change this to allow either negative - or positive +

[+-]d{2}:\d{2}"

@Xel-Naha Xel-Naha changed the title allow for positive or negative offset time zones fix: allow for positive or negative offset time zones Sep 30, 2024
@gmuloc
Copy link
Collaborator

gmuloc commented Sep 30, 2024

Hello @Xel-Naha thanks for opening this PR - could you please look at adding some test to make sure we capture this in our CI? If you need pointers let me know!

@Xel-Naha
Copy link
Contributor Author

Hello @Xel-Naha thanks for opening this PR - could you please look at adding some test to make sure we capture this in our CI? If you need pointers let me know!

hi @gmuloc happy to write a test but some pointers would certainly be helpful,

Copy link

codspeed-hq bot commented Oct 2, 2024

CodSpeed Performance Report

Merging #842 will not alter performance

Comparing Xel-Naha:main (b654ce1) with main (fc644a1)

Summary

✅ 4 untouched benchmarks

Copy link
Contributor Author

@Xel-Naha Xel-Naha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added unit test for positive offset and rename original unit test to negative offset. @gmuloc mind reviewing and letting me know if anything else needs adding / changing? thanks!

Copy link

sonarqubecloud bot commented Oct 3, 2024

@Xel-Naha
Copy link
Contributor Author

Xel-Naha commented Oct 4, 2024

hi @gmuloc, I just had a look at the failing test and I don't think this is any issue with the code (after all its a minor modification from existing code) however the pipeline seems to have issues downloading something:

__getitem__
    raise KeyError(key) from None
KeyError: 'SSS_SERVICE_URL'
Error: Process completed with exit code 1.
Run cat ./target/job_summary.md >> $GITHUB_STEP_SUMMARY
cat: ./target/job_summary.md: No such file or directory
Error: Process completed with exit code 1.

i'm suspecting it might be something that needs reviewing on your end?

@gmuloc
Copy link
Collaborator

gmuloc commented Oct 4, 2024

hi @gmuloc, I just had a look at the failing test and I don't think this is any issue with the code (after all its a minor modification from existing code) however the pipeline seems to have issues downloading something:

__getitem__
    raise KeyError(key) from None
KeyError: 'SSS_SERVICE_URL'
Error: Process completed with exit code 1.
Run cat ./target/job_summary.md >> $GITHUB_STEP_SUMMARY
cat: ./target/job_summary.md: No such file or directory
Error: Process completed with exit code 1.

i'm suspecting it might be something that needs reviewing on your end?

yeah its on our side we need to check with people maintaining this service internally.
we will merge as soon as we can

@gmuloc gmuloc changed the title fix: allow for positive or negative offset time zones fix(anta.tests): allow for positive or negative offset time zones Oct 4, 2024
@gmuloc gmuloc merged commit 29e08cb into aristanetworks:main Oct 4, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants